
<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@ page import="com.wlcorp.forcazamis.sys.permission.PermissionManager" %>
<%@ page import="com.wlcorp.forcazamis.domain.baseinfo.Depot" %>
<%@ page import="com.wlcorp.forcazamis.sys.util.CommonUtil" %>
<%@ page import="com.wlcorp.forcazamis.sys.util.AppConstant" %>
<%
	List depotList = (List)request.getAttribute("depotList");
%>
<html>
<head>
	<title>仓库列表</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0">
	<link href="${pageContext.request.contextPath}/css/css.css" rel=stylesheet>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/pagetitle_css.css" type="text/css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/button_css.css" type="text/css">
	<script type="text/javascript">
    	function depotDetail(depotId){
    		window.location = "${pageContext.request.contextPath}/baseinfo/depotManager.do?method=getDepot&depotId=" + depotId;
    	}
    	function deleteRecord(depotId){
    		if(confirm("确定删除？")){
    			window.location = "${pageContext.request.contextPath}/baseinfo/depotManager.do?method=deleteDepot&depotId=" + depotId;
    		}
    	}
    </script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
  <center>
  	<table width="100%" border="0" cellspacing="0" cellpadding="0" height="30">
	    <tr> 
	      <td width="23" class="page_titlebar_head">&nbsp;</td>
	      
	    <td class="page_titlebar_bg">仓库列表</td>
	    </tr>
	</table>
	<table width="90%" border="0" cellspacing="1" cellpadding="0" bgcolor="#999999">
          <tr bgcolor="#E7E7E7">
            <td class="bigtext" align="center" width="5%">序号</td>
            <td class="bigtext" align="center">名称</td>
            <td class="bigtext" align="center">别名</td>
            <td class="bigtext" align="center">编号</td>
            <td class="bigtext" align="center">编辑</td>
          </tr>
          <% 
          	int index = 0;
          	for(Iterator iter = depotList.iterator();iter.hasNext();){
          		Depot depot = (Depot)iter.next();
          		index++;
          %>
          <tr bgcolor="#ffffff" onmouseover="this.style.backgroundColor='#bbdffb';" onmouseout="this.style.backgroundColor='#ffffff'">
            <td align="center" class="td5px"><%=index%></td>
            <td class="td5px"><%=CommonUtil.nullToStr(depot.getDepotName())%></td>
            <td class="td5px"><%=CommonUtil.nullToStr(depot.getDepotOtherName())%></td>
            <td class="td5px"><%=CommonUtil.nullToStr(depot.getDepotCode())%></td>
            <td align="center" class="td5px">
            	<a id="modifyA" href="javascript:depotDetail('<%=depot.getDepotId()%>')">修改</a>&nbsp;
   				<%
   					if(!AppConstant.DEPOT_ID_SAMPLE.equals(depot.getDepotId())){
   				%>
            	<a id="deleteA" href="javascript:deleteRecord('<%=depot.getDepotId()%>')">删除</a>&nbsp;
            	<%}%>
            </td>
		  </tr>
          <%}%>
          <tr bgcolor="#ffffff" onmouseover="this.style.backgroundColor='#bbdffb';" onmouseout="this.style.backgroundColor='#ffffff'">
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td align="center" class="td5px">
            	<a id="modifyA" href="javascript:depotDetail('')">新增</a>&nbsp;
            </td>
		  </tr>
	</table>
  </center>
  ${message}
</body>
</html>
<jsp:include page="../footer.jsp"/>